<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@taglib prefix="ui" tagdir="/WEB-INF/tags/UI"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<div>
	<div class="page-header">
		<h4>
			文章列表 
		</h4>
	</div>
	<table class="table table-condensed">
		<thead>
			<tr>
				<th>#</th>
				<th>文章标题</th>
				<th>创建时间</th>
			</tr>
		</thead>
		<tbody>
			<c:if test="${!empty list.result}">
				<c:forEach var="entity" items="${list.result}" varStatus="status">
					<tr>
						<td>${status.count}</td>
						<td><a href="<%=request.getContextPath()%>/article/${entity.aid}.xhtml">${entity.title}</a></td>
						<td><spring:eval expression="entity.create_date"></spring:eval></td>
					</tr>
				</c:forEach>
			</c:if>
			<c:if test="${empty list.result}">
				<tr>
					<td colspan="3">没有文章</td>
				</tr>
			</c:if>
		</tbody>
	</table>
</div>
<div class="row">
	<div class="span7 pagination pagination-right">
		<ui:pagination url="${url}" totalPage="${list.totalPages}" pageNo="${list.p}"></ui:pagination>
	</div>
	<div class="span3 pagination">
		<form class="form-horizontal" method="get">
			<fieldset>
				<input type="hidden" name="type" value="${list.type}">
				<div class="control-group">
					<label style="min-width: 90px" class="control-label">共 ${list.totalPages} 页,跳转到</label>
					<div class="controls" style="margin-left: 95px">
						<div class="input-append">
							<input class="span2" name="p" size="16" type="text" style="width: 39px; height: 26px;" /><button style="padding: 8px" class="btn" type="submit">前往</button>
						</div>
					</div>
				</div>
			</fieldset>
		</form>
	</div>
</div>